//package www.wen.com.common.lib.view.popuview
//
//import android.annotation.SuppressLint
//import android.content.Context
//import android.view.View
//import android.widget.FrameLayout
//import android.widget.TextView
//import com.bigkoo.pickerview.builder.OptionsPickerBuilder
//import com.bigkoo.pickerview.view.OptionsPickerView
//import com.contrarywind.view.WheelView
//import com.lxj.xpopup.core.BottomPopupView
//import com.lxj.xpopup.util.XPopupUtils
//import www.wen.com.common.R
//import www.wen.com.common.lib.extension.getColorAgency
//import www.wen.com.common.lib.extension.setOnClickListenerAgency
//import www.wen.com.common.lib.helper.ResultUiCallBack
//
//class BottomSelectPopupView(
//    context: Context,
//    private var title: CharSequence? = null,
//    private var optionItems: List<String> = mutableListOf(),
//    private val resultCallBack: ResultUiCallBack<String>? = null,
//) : BottomPopupView(context), View.OnClickListener {
//
//    private lateinit var mOptions: OptionsPickerView<String>
//
//    private var selectItem: String? = null
//
//    private lateinit var mTvOK: View
//
//    private lateinit var mImgClose: View
//
//    private lateinit var mTvTitle: TextView
//
//    private lateinit var mTimePickerContainer: FrameLayout
//
//    private lateinit var mTimePickerInnerContainer: FrameLayout
//
//    override fun getImplLayoutId(): Int = R.layout.popupview_bottom_select
//
//    override fun getMaxHeight(): Int = (XPopupUtils.getScreenHeight(context) * 0.45f).toInt()
//
//    @SuppressLint("ResourceAsColor")
//    override fun onCreate() {
//        super.onCreate()
//
//        mImgClose = findViewById(R.id.imgClose)
//        mTvOK = findViewById(R.id.tvOK)
//        mTvTitle = findViewById(R.id.tvTitle)
//        mTimePickerContainer = findViewById(R.id.timePickerContainer)
//        mTimePickerInnerContainer = findViewById(R.id.timePickerInnerContainer)
//
//        mTvTitle.text = title
//
//        mOptions = OptionsPickerBuilder(context) { options1, _, _, _ ->
//            selectItem = optionItems[options1]
//        }
//                .setLineSpacingMultiplier(2f)
//                .setDividerColor(R.color.colorECECEC)
//                .setLayoutRes(R.layout.pickerview_area) {}
//                .setContentTextSize(15)
//                .setItemVisibleCount(12)
//                .setDecorView(mTimePickerInnerContainer)
//                .setDividerType(WheelView.DividerType.FILL)
//                .setOutSideColor(getColorAgency(R.color.color000000))
//                .setBgColor(getColorAgency(R.color.colorFFFFFF))
//                .setTextColorCenter(getColorAgency(R.color.color000000))
//                .build()
//        mOptions.setPicker(optionItems)
//
//        mOptions.show(false)
//
//        mOptions.returnData()
//        setOnClickListenerAgency(this, mImgClose, mTvOK)
//    }
//
//    override fun onClick(v: View) {
//        when (v.id) {
//            R.id.imgClose -> {
//            }
//            R.id.tvOK -> {
//                mOptions.returnData()
//                resultCallBack?.invoke(v, selectItem!!, this)
//            }
//        }
//        dismiss()
//    }
//}